<template>
  <div class="tabdetial">
    <!-- 课程列表 -->
    <Nav></Nav>
    <div class="banner-wrap">
      <img class="banner" :src="tabdetailBg" />
      <!-- <div class="btn">点击查看</div> -->
    </div>
    <div class="wrap">
    
      <div class="tab">
        <span class="line"></span>
        <span>三位一体</span>
        <span>课程介绍</span>
        <span class="more" @click="goToMore"> <img src="../../assets/pc/homepage-more.png" /></span>
      </div>
      <div class="introduce-wrap">
        <div
          class="introduce-wrap-item"
          v-for="(item, index) in info.trinity"
          @click="gotoSchool(item.id)"
          :key="item.name"
        >
          <introduceProject
            :index="index"
            :introduce="item"
            :readMore="false"
          ></introduceProject>
        </div>
      </div>

       <div class="tab">
        <span class="line"></span>
        <span>强基计划</span>
        <span>课程介绍</span>
        <span class="more" @click="goToMore"> <img src="../../assets/pc/homepage-more.png" /></span>

      </div>
       <div class="introduce-wrap">
        <div
          class="introduce-wrap-item"
          v-for="(item, index) in info.plan"
          @click="gotoSchool(item.id)"
          :key="item.name"
        >
          <introduceProject
            :index="index"
            :introduce="item"
            :readMore="false"
          ></introduceProject>
        </div>
      </div>

     <div class="tab">
        <span class="line"></span>
        <span>高职提前批</span>
        <span>课程介绍</span>
        <span class="more" @click="goToMore"> <img src="../../assets/pc/homepage-more.png" /></span>

      </div>
        <div class="introduce-wrap">
        <div
          class="introduce-wrap-item"
          v-for="(item, index) in info.forward"
          @click="gotoSchool(item.id)"
          :key="item.name"
        >
          <introduceProject
            :index="index"
            :introduce="item"
            :readMore="false"
          ></introduceProject>
        </div>
      </div>
  


    </div>

    <Footer></Footer>
  </div>
</template>

<script setup>
import Footer from '../../components/pc/Footer.vue';
import Nav from '../../components/pc/nav.vue';
import schoolProject from '../../components/pc/schoolProject.vue';
import introduceProject from '../../components/pc/introduceProject.vue';
import consultationProject from '../../components/pc/consultationProject.vue';
import { onMounted, ref } from 'vue';
import { getCourseListPC } from '../../api/apiList/pcApi.js';
import tabdetailBg from '../../assets/pc/class-bg.png';
import homepageTab2 from '../../assets/pc/homepage-tab2.png';
import homepageTab3 from '../../assets/pc/homepage-tab3.png';
import homepageTab4 from '../../assets/pc/homepage-tab4.png';
import homepageTab5 from '../../assets/pc/homepage-tab5.png';
let info = ref({});
import { useRouter } from 'vue-router';
const router = useRouter();
onMounted(async () => {
  console.log(11);
  // 获取列表数据
  await getCourseListPC().then((res) => {
    const { result } = res;
    info.value = result;
  });
});

const goToMore = () => {
  router.push({ path: '/classListPc' });
};
</script>

<style lang="less" scoped>
.tabdetial {
    .introduce-wrap {
        margin-top: 15Px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
  .wrap {
    position: relative;
    width: 1201Px;
    margin: 0 auto;
    .btn {
      position: absolute;
      left: 289Px;
      top: -110Px;
      text-align: center;
      line-height: 60Px;
      width: 293Px;
      height: 60Px;
      background: #ffffff;
      border-radius: 40Px;
      font-size: 32Px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #666666;
    }
  }
  .banner-wrap {
    position: relative;
    width: 100vw;
    height: auto;
  }
  .banner {
    width: 100vw;
    height: auto;
    margin-bottom: 30Px;
  }
  .tab {
    font-size: 23Px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #000;
    line-height: 40Px;
    margin-bottom: 30Px;
    display: flex;
    align-items: center;
    .more {
        cursor: pointer;
        position: absolute;
        right: 0;
        font-weight: bold;
        color: #034171;
        font-size: 18Px;
        text-align: right;
        img {
            width: 120Px;
        }
    }
    .line {
        width: 3Px;
        height: 20Px;
        background: linear-gradient(140deg, #011a35 0%, #000000 100%);
    }
    span {
      display: inline-block;
      margin-right: 20Px;
    }
  }

}
</style>
